Integrand size = 29, antiderivative size = 91 \[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {3 \text {arctanh}(\cos (c+d x))}{a^2 d}-\frac {3 \cot (c+d x)}{a^2 d}-\frac {\cot ^3(c+d x)}{3 a^2 d}+\frac {\cot (c+d x) \csc (c+d x)}{a^2 d}-\frac {2 \cos (c+d x)}{a^2 d (1+\sin (c+d x))} \]
3*arctanh(cos(d*x+c))/a^2/d-3*cot(d*x+c)/a^2/d-1/3*cot(d*x+c)^3/a^2/d+cot( d*x+c)*csc(d*x+c)/a^2/d-2*cos(d*x+c)/a^2/d/(1+sin(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(472\) vs. \(2(91)=182\).
Time = 1.65 (sec) , antiderivative size = 472, normalized size of antiderivative = 5.19 \[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\left (\csc \left (\frac {1}{2} (c+d x)\right )+\sec \left (\frac {1}{2} (c+d x)\right )\right )^3 \left (-10 \cos \left (\frac {5}{2} (c+d x)\right )+20 \cos \left (\frac {7}{2} (c+d x)\right )-9 \cos \left (\frac {5}{2} (c+d x)\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+9 \cos \left (\frac {7}{2} (c+d x)\right ) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+3 \cos \left (\frac {1}{2} (c+d x)\right ) \left (8+9 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-9 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )-3 \cos \left (\frac {3}{2} (c+d x)\right ) \left (14+9 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-9 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right )+9 \cos \left (\frac {5}{2} (c+d x)\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-9 \cos \left (\frac {7}{2} (c+d x)\right ) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+12 \sin \left (\frac {1}{2} (c+d x)\right )+27 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {1}{2} (c+d x)\right )-27 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {1}{2} (c+d x)\right )-6 \sin \left (\frac {3}{2} (c+d x)\right )+27 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {3}{2} (c+d x)\right )-27 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {3}{2} (c+d x)\right )-2 \sin \left (\frac {5}{2} (c+d x)\right )-9 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {5}{2} (c+d x)\right )+9 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {5}{2} (c+d x)\right )+8 \sin \left (\frac {7}{2} (c+d x)\right )-9 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {7}{2} (c+d x)\right )+9 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right ) \sin \left (\frac {7}{2} (c+d x)\right )\right )}{192 a^2 d (1+\sin (c+d x))^2} \]
((Csc[(c + d*x)/2] + Sec[(c + d*x)/2])^3*(-10*Cos[(5*(c + d*x))/2] + 20*Co s[(7*(c + d*x))/2] - 9*Cos[(5*(c + d*x))/2]*Log[Cos[(c + d*x)/2]] + 9*Cos[ (7*(c + d*x))/2]*Log[Cos[(c + d*x)/2]] + 3*Cos[(c + d*x)/2]*(8 + 9*Log[Cos [(c + d*x)/2]] - 9*Log[Sin[(c + d*x)/2]]) - 3*Cos[(3*(c + d*x))/2]*(14 + 9 *Log[Cos[(c + d*x)/2]] - 9*Log[Sin[(c + d*x)/2]]) + 9*Cos[(5*(c + d*x))/2] *Log[Sin[(c + d*x)/2]] - 9*Cos[(7*(c + d*x))/2]*Log[Sin[(c + d*x)/2]] + 12 *Sin[(c + d*x)/2] + 27*Log[Cos[(c + d*x)/2]]*Sin[(c + d*x)/2] - 27*Log[Sin [(c + d*x)/2]]*Sin[(c + d*x)/2] - 6*Sin[(3*(c + d*x))/2] + 27*Log[Cos[(c + d*x)/2]]*Sin[(3*(c + d*x))/2] - 27*Log[Sin[(c + d*x)/2]]*Sin[(3*(c + d*x) )/2] - 2*Sin[(5*(c + d*x))/2] - 9*Log[Cos[(c + d*x)/2]]*Sin[(5*(c + d*x))/ 2] + 9*Log[Sin[(c + d*x)/2]]*Sin[(5*(c + d*x))/2] + 8*Sin[(7*(c + d*x))/2] - 9*Log[Cos[(c + d*x)/2]]*Sin[(7*(c + d*x))/2] + 9*Log[Sin[(c + d*x)/2]]* Sin[(7*(c + d*x))/2]))/(192*a^2*d*(1 + Sin[c + d*x])^2)
Time = 0.47 (sec) , antiderivative size = 80, normalized size of antiderivative = 0.88, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3353, 3042, 3445, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a \sin (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (c+d x)^2}{\sin (c+d x)^4 (a \sin (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3353 |
\(\displaystyle \frac {\int \frac {\csc ^4(c+d x) (a-a \sin (c+d x))}{\sin (c+d x) a+a}dx}{a^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a-a \sin (c+d x)}{\sin (c+d x)^4 (\sin (c+d x) a+a)}dx}{a^2}\) |
\(\Big \downarrow \) 3445 |
\(\displaystyle \frac {\int \left (\csc ^4(c+d x)-2 \csc ^3(c+d x)+2 \csc ^2(c+d x)-2 \csc (c+d x)+\frac {2}{\sin (c+d x)+1}\right )dx}{a^2}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {3 \text {arctanh}(\cos (c+d x))}{d}-\frac {\cot ^3(c+d x)}{3 d}-\frac {3 \cot (c+d x)}{d}-\frac {2 \cos (c+d x)}{d (\sin (c+d x)+1)}+\frac {\cot (c+d x) \csc (c+d x)}{d}}{a^2}\) |
((3*ArcTanh[Cos[c + d*x]])/d - (3*Cot[c + d*x])/d - Cot[c + d*x]^3/(3*d) + (Cot[c + d*x]*Csc[c + d*x])/d - (2*Cos[c + d*x])/(d*(1 + Sin[c + d*x])))/ a^2
3.4.14.3.1 Defintions of rubi rules used
Int[cos[(e_.) + (f_.)*(x_)]^2*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[1/b^2 Int[(d*Sin[e + f*x])^n*(a + b*Sin[e + f*x])^(m + 1)*(a - b*Sin[e + f*x]), x], x] /; Fre eQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 - b^2, 0] && (ILtQ[m, 0] || !IGtQ[ n, 0])
Int[sin[(e_.) + (f_.)*(x_)]^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m _.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[ExpandTrig[si n[e + f*x]^n*(a + b*sin[e + f*x])^m*(A + B*sin[e + f*x]), x], x] /; FreeQ[{ a, b, e, f, A, B}, x] && EqQ[A*b + a*B, 0] && EqQ[a^2 - b^2, 0] && IntegerQ [m] && IntegerQ[n]
Time = 0.35 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.24
method | result | size |
derivativedivides | \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+11 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {11}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{8 d \,a^{2}}\) | \(113\) |
default | \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+11 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}+\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {11}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}-24 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {32}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{8 d \,a^{2}}\) | \(113\) |
parallelrisch | \(\frac {\left (-72 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-72\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )-\left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-5 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+5 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+27 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-27 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )+162 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d \,a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) | \(132\) |
risch | \(-\frac {2 \left (9 i {\mathrm e}^{5 i \left (d x +c \right )}-24 \,{\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{6 i \left (d x +c \right )}-18 i {\mathrm e}^{3 i \left (d x +c \right )}+33 \,{\mathrm e}^{2 i \left (d x +c \right )}+5 i {\mathrm e}^{i \left (d x +c \right )}-14\right )}{3 \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) d \,a^{2}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d \,a^{2}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d \,a^{2}}\) | \(148\) |
norman | \(\frac {-\frac {1}{24 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}-\frac {3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}+\frac {3 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}-\frac {\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d a}+\frac {\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d a}-\frac {65 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{6 d a}-\frac {83 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}-\frac {47 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {3 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d \,a^{2}}\) | \(207\) |
1/8/d/a^2*(1/3*tan(1/2*d*x+1/2*c)^3-2*tan(1/2*d*x+1/2*c)^2+11*tan(1/2*d*x+ 1/2*c)-1/3/tan(1/2*d*x+1/2*c)^3+2/tan(1/2*d*x+1/2*c)^2-11/tan(1/2*d*x+1/2* c)-24*ln(tan(1/2*d*x+1/2*c))-32/(tan(1/2*d*x+1/2*c)+1))
Leaf count of result is larger than twice the leaf count of optimal. 302 vs. \(2 (89) = 178\).
Time = 0.27 (sec) , antiderivative size = 302, normalized size of antiderivative = 3.32 \[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {28 \, \cos \left (d x + c\right )^{4} + 10 \, \cos \left (d x + c\right )^{3} - 42 \, \cos \left (d x + c\right )^{2} + 9 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - 9 \, {\left (\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} - {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2} - \cos \left (d x + c\right ) - 1\right )} \sin \left (d x + c\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, {\left (14 \, \cos \left (d x + c\right )^{3} + 9 \, \cos \left (d x + c\right )^{2} - 12 \, \cos \left (d x + c\right ) - 6\right )} \sin \left (d x + c\right ) - 12 \, \cos \left (d x + c\right ) + 12}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} - 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d - {\left (a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2} - a^{2} d \cos \left (d x + c\right ) - a^{2} d\right )} \sin \left (d x + c\right )\right )}} \]
1/6*(28*cos(d*x + c)^4 + 10*cos(d*x + c)^3 - 42*cos(d*x + c)^2 + 9*(cos(d* x + c)^4 - 2*cos(d*x + c)^2 - (cos(d*x + c)^3 + cos(d*x + c)^2 - cos(d*x + c) - 1)*sin(d*x + c) + 1)*log(1/2*cos(d*x + c) + 1/2) - 9*(cos(d*x + c)^4 - 2*cos(d*x + c)^2 - (cos(d*x + c)^3 + cos(d*x + c)^2 - cos(d*x + c) - 1) *sin(d*x + c) + 1)*log(-1/2*cos(d*x + c) + 1/2) + 2*(14*cos(d*x + c)^3 + 9 *cos(d*x + c)^2 - 12*cos(d*x + c) - 6)*sin(d*x + c) - 12*cos(d*x + c) + 12 )/(a^2*d*cos(d*x + c)^4 - 2*a^2*d*cos(d*x + c)^2 + a^2*d - (a^2*d*cos(d*x + c)^3 + a^2*d*cos(d*x + c)^2 - a^2*d*cos(d*x + c) - a^2*d)*sin(d*x + c))
\[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\int \frac {\cos ^{2}{\left (c + d x \right )} \csc ^{4}{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} + 2 \sin {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
Leaf count of result is larger than twice the leaf count of optimal. 199 vs. \(2 (89) = 178\).
Time = 0.20 (sec) , antiderivative size = 199, normalized size of antiderivative = 2.19 \[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {\frac {\frac {5 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {27 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {129 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} - 1}{\frac {a^{2} \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {a^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} + \frac {\frac {33 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {6 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {72 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}}{24 \, d} \]
1/24*((5*sin(d*x + c)/(cos(d*x + c) + 1) - 27*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 129*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 - 1)/(a^2*sin(d*x + c)^3 /(cos(d*x + c) + 1)^3 + a^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) + (33*sin (d*x + c)/(cos(d*x + c) + 1) - 6*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + sin (d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 72*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^2)/d
Time = 0.47 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.60 \[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=-\frac {\frac {72 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{2}} + \frac {96}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}} - \frac {132 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 33 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 6 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}} - \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 6 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 33 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{24 \, d} \]
-1/24*(72*log(abs(tan(1/2*d*x + 1/2*c)))/a^2 + 96/(a^2*(tan(1/2*d*x + 1/2* c) + 1)) - (132*tan(1/2*d*x + 1/2*c)^3 - 33*tan(1/2*d*x + 1/2*c)^2 + 6*tan (1/2*d*x + 1/2*c) - 1)/(a^2*tan(1/2*d*x + 1/2*c)^3) - (a^4*tan(1/2*d*x + 1 /2*c)^3 - 6*a^4*tan(1/2*d*x + 1/2*c)^2 + 33*a^4*tan(1/2*d*x + 1/2*c))/a^6) /d
Time = 9.62 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.68 \[ \int \frac {\cot ^2(c+d x) \csc ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{4\,a^2\,d}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {43\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+9\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}+\frac {1}{3}}{d\,\left (8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+8\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )}+\frac {11\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,a^2\,d} \]